package net.xumf.web.controller.system.log;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import net.xumf.domain.master.SystemLog;
import net.xumf.service.master.SystemLogService;
import net.xumf.support.annotation.RequiresPermissions;
import net.xumf.support.enums.Logical;
import net.xumf.support.model.ResponseResult;
import net.xumf.support.model.dto.PageDTO;
import net.xumf.web.controller.common.BaseControllerImpl;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(value = "用户操作日志管理", description = "用户操作日志管理")
@RequestMapping("system/log")
public class SystemLogController extends BaseControllerImpl<PageDTO, SystemLogService, SystemLog, Long> {

    @Override
    @RequiresPermissions(value = {"membership.event:view", "membership.event:*"}, logical = Logical.OR)
    public ResponseResult get(@PathVariable Long id) {
        return super.get(id);
    }

    @Override
    @RequiresPermissions(value = {"membership.event:add", "membership.event:*"}, logical = Logical.OR)
    public ResponseResult add(SystemLog systemLog) {
        return super.add(systemLog);
    }

    @Override
    @RequiresPermissions(value = {"membership.event:delete", "membership.event:*"}, logical = Logical.OR)
    public ResponseResult del(@PathVariable Long id) {
        return super.del(id);
    }

    @Override
    @RequiresPermissions(value = {"membership.event:edit", "membership.event:*"}, logical = Logical.OR)
    public ResponseResult edit(@PathVariable Long id, SystemLog p) {
        return super.edit(id, p);
    }

}
